typedef float flt;				// floating point type which is used by GPU
typedef flt* FP;				// floating number pointer
typedef byte* BP;				// byte pointer
typedef char* str;				// char pointer
typedef const char* const_str;	// const char pointer

//	Unified syntax
//		LE Pre-defined GameObject types
typedef BP TEntity;
typedef BP TBody;
typedef BP TCamera;
typedef BP TController;
typedef BP TCorona;
typedef BP TEmitter;
typedef BP TJoint;
typedef BP TLight;
typedef BP TListener;
typedef BP TMesh;
typedef BP TModel;
typedef BP TPivot;
typedef BP TSource;
typedef BP TTerrain;
typedef BP TTire;
typedef BP TVehicle;

//		Resource types
typedef BP TBuffer;
typedef BP TFont;
typedef BP TMaterial;
typedef BP TShader;
typedef BP TSound;
typedef BP TSurface;
typedef BP TTexture;
//Actually there should be a resource type representing the collidors
//But LE merge it with the TBody type
//Also an animation sequence type is required

//		Scene management types
typedef BP TFramework;
typedef BP TGroup;
typedef BP TLayer;
typedef BP TWorld;

typedef BP TScript;

typedef FP TVector;

struct TVec2{union{struct{flt X;flt Y;};flt a[2];};};				// textureUV value
struct TVec3{union{struct{flt X;flt Y;flt Z;};flt a[3];};};			// color, vertex, etc... value
struct TVec4{union{struct{flt X;flt Y;flt Z;flt W;};flt a[4];};};	// color+alpha value
struct TVec6{union{struct{
				flt X0;flt Y0;flt Z0;
				flt X1;flt Y1;flt Z1;};
				flt a[6];};};						// AABB
struct TVec9{union{struct{
				flt A0;flt A1;flt A2;
				flt B0;flt B1;flt B2;
				flt C0;flt C1;flt C2;};
				flt a[9];};};						// 3x3 matrix
struct TVec16{union{struct{
				flt A0;flt A1;flt A2;flt A3;
				flt B0;flt B1;flt B2;flt B3;
				flt C0;flt C1;flt C2;flt C3;
				flt D0;flt D1;flt D2;flt D3;};
				flt a[16];};};						// 4x4 matrix
const flt MAX_DEC = 9999999999.9999999999;

TVec2 Vec2(flt X=0, flt Y=MAX_DEC);
TVec2 Vec2(flt X, flt Y);

TVec3 Vec3(flt X=0, flt Y=MAX_DEC, flt Z=MAX_DEC);
TVec3 Vec3(flt X, flt Y, flt Z);

TVec4 Vec4(flt X=0, flt Y=MAX_DEC, flt Z=MAX_DEC, flt W=MAX_DEC);
TVec4 Vec4(flt X, flt Y, flt Z, flt W);

TVec6 Vec6  (flt X0=0, flt Y0=MAX_DEC, flt Z0=MAX_DEC,
			 flt X1=MAX_DEC, flt Y1=MAX_DEC, flt Z1=MAX_DEC);
TVec6 Vec6  (flt X0, flt Y0, flt Z0,
			 flt X1, flt Y1, flt Z1);

TVec9 Vec9  (flt A0=0, flt A1=MAX_DEC, flt A2=MAX_DEC,
			 flt B0=MAX_DEC, flt B1=MAX_DEC, flt B2=MAX_DEC,
			 flt C0=MAX_DEC, flt C1=MAX_DEC, flt C2=MAX_DEC);
TVec9 Vec9  (flt A0, flt A1, flt A2,
			 flt B0, flt B1, flt B2,
			 flt C0, flt C1, flt C2);

TVec16 Vec16(flt A0=0, flt A1=MAX_DEC, flt A2=MAX_DEC, flt A3=MAX_DEC,
			 flt B0=MAX_DEC, flt B1=MAX_DEC, flt B2=MAX_DEC, flt B3=MAX_DEC,
			 flt C0=MAX_DEC, flt C1=MAX_DEC, flt C2=MAX_DEC, flt C3=MAX_DEC,
			 flt D0=MAX_DEC, flt D1=MAX_DEC, flt D2=MAX_DEC, flt D3=MAX_DEC);
TVec16 Vec16(flt A0, flt A1, flt A2, flt A3,
			 flt B0, flt B1, flt B2, flt B3,
			 flt C0, flt C1, flt C2, flt C3,
			 flt D0, flt D1, flt D2, flt D3);

struct TPick
{
	TEntity entity;
	TEntity surface;
	flt X, Y, Z;
	flt NX, NY, NZ;
	int triangle;
};